<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Insert title here</title>

<script language="javascript" type="text/javascript" src="../jqPlotJS/jquery.min.js"></script>
<script language="javascript" type="text/javascript" src="../jqPlotJS/jquery.jqplot.min.js"></script>
<script language="javascript" type="text/javascript" src="../jqPlotJS/excanvas.js"></script>
<script language="javascript" type="text/javascript" src="../jqPlotJS/jqplot.logAxisRenderer.min.js"></script>
<script language="javascript" type="text/javascript" src="../jqPlotJS/jqplot.canvasTextRenderer.min.js"></script>
<script language="javascript" type="text/javascript" src="../jqPlotJS/jqplot.canvasAxisLabelRenderer.min.js"></script>
<script language="javascript" type="text/javascript" src="../jqPlotJS/jqplot.dateAxisRenderer.min.js"></script>
<script language="javascript" type="text/javascript" src="../jqPlotJS/jqplot.canvasAxisTickRenderer.min.js"></script>
<script language="javascript" type="text/javascript" src="../jqPlotJS/jqplot.pointLabels.min.js"></script>
<script language="javascript" type="text/javascript" src="../jqPlotJS/jqplot.barRenderer.min.js"></script>
<script language="javascript" type="text/javascript" src="../jqPlotJS/jqplot.highlighter.min.js"></script>
<script language="javascript" type="text/javascript" src="../jqPlotJS/jqplot.canvasOverlay.min.js"></script>

<link rel="stylesheet" type="text/css" href="../jqPlotJS/jquery.jqplot.css" />
<link rel="stylesheet" type="text/css" href="../css/site.css">
<style type="text/css">
	body{
		background-color: #F7E6F9;
	}
</style>
<script language="javascript" type="text/javascript" src="../js/analyse-line-d.js"></script>

<script type="text/javascript">
	
	$(function(){
		//图表标题
		options.title.text = '外径纵向折线图';
		//数据点提示信息
		options.highlighter.formatString = '<table class="jqplot-highlighter">'+     
		'<tr><td>时&nbsp;&nbsp;&nbsp;&nbsp;间:</td><td>%s</td></tr> '+      
		'<tr><td>外径纵向:</td><td>%s</td></tr></table> ';
		//y轴标题
		options.axes.yaxis.label = '外径纵向(mm)';
		
		//理论上限：需要设置y轴最大坐标	
		//if($("#idC").val() == "[]"){
		//	options.axes.yaxis.max = Math.max(warningA,warningB) + 0.3;
		//}else{
		//	options.axes.yaxis.max = Math.max(warningA,warningB,warningC) + 0.3;
		//}
		options.axes.yaxis.max =parseFloat($("#warning_位置A").val()) + 0.3;
		//$.jqplot('showDIV',	lines,options);
		showPic();
	});

</script>

</head>
<body>
	<c:forEach items="${requestScope.positions }" var="position">
		<c:set var="total" value="" />
		<c:forEach items="${position.realitys}" var="reality">
			<c:set var="total" value="${total }['${reality.time }',${reality.outerDiameterY }]," />
		</c:forEach>
		<c:set var="size" value="${fn:length(total)-1}" />
		<!-- json数据拼装 -->
		<input type="hidden" id="data_${position.positionName }" value="[${fn:substring(total,0,size) }]"/>
		<!-- 预警参数 -->
		<input type="hidden" id="warning_${position.positionName }" value="${position.outWarnValue}"/>
		<!-- 显示按钮 -->
		<input type="button" id="btn_${position.positionName }" value="${position.positionName }" class="butDef"/> 
	</c:forEach>
	<!-- <input type="button" id="posAll" value="显示全部" /> -->
	
	<div id="showDIV"></div> 
</body>
</html>